<?php
session_start();
require_once "../lib/standard.php";
Globals::init();
//$login = $_REQUEST['login'];
//$pass = $_REQUEST['pass'];
//echo $login;
$query = "SELECT `login` FROM `komotis` WHERE `login` = '" . $_REQUEST['login'] . "' AND 
	`password` = '" . $_REQUEST['pass'] . "' LIMIT 1";

$result = mysqli_query(Globals::$db, $query);

$row = mysqli_fetch_array($result);
echo $row['login'];
if (!$row) {
	header("Location: http://" . $_SERVER["SERVER_NAME"] . "/panospanos2/acount/login.php");
}

mysqli_free_result($result);
$_SESSION['login'] = $row['login'];
header("Location: http://" . $_SERVER["SERVER_NAME"] . "/panospanos2/index.php");
?>
